package mjc.egg;
import mjc.compiler.*;
import mjc.gc.*;
import mg.egg.eggc.compiler.libjava.lex.*;
import mg.egg.eggc.compiler.libjava.messages.*;
import mg.egg.eggc.compiler.libjava.*;
import mg.egg.eggc.compiler.libjava.problem.IProblem;
import java.util.Vector;
public class S_AFFX_MJAVA {
LEX_MJAVA scanner;
  S_AFFX_MJAVA() {
    }
  S_AFFX_MJAVA(LEX_MJAVA scanner) {
    this.scanner = scanner;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  boolean att_isVariable;
  TDS att_htdsclasses;
  TDS att_htdsvarlocales;
  INFOCLASSE att_hinfoclasse;
  DTYPE att_type;
  LEX_MJAVA att_scanner;
  private void regle35() throws Exception {

    //declaration
    T_MJAVA x_2 = new T_MJAVA(scanner ) ;
    S_ER_MJAVA x_3 = new S_ER_MJAVA(scanner) ;
    S_AFFX_MJAVA x_4 = new S_AFFX_MJAVA(scanner) ;
    //appel
      action_auto_inh_35(x_3, x_4);
    x_2.analyser(LEX_MJAVA.token_affect);
    x_3.analyser() ;
    x_4.analyser() ;
      action_typage7_35(x_3, x_4);
      action_action_35(x_3, x_4);
  }
  private void regle36() throws Exception {

    //declaration
    //appel
      action_action_36();
      action_typage8_36();
  }
private void action_action_36() throws Exception {
try {
// instructions
this.att_isVariable=true;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_typage7_35(S_ER_MJAVA x_3, S_AFFX_MJAVA x_4) throws Exception {
try {
// instructions
if (x_4.att_type.compareTo( new DTYPE("void", 0))){
this.att_type=x_3.att_type;
}
else {
this.att_type=x_4.att_type;
}
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_35(S_ER_MJAVA x_3, S_AFFX_MJAVA x_4) throws Exception {
try {
// instructions
x_3.att_htdsvarlocales=this.att_htdsvarlocales;
x_4.att_htdsvarlocales=this.att_htdsvarlocales;
x_3.att_htdsclasses=this.att_htdsclasses;
x_4.att_htdsclasses=this.att_htdsclasses;
x_3.att_hinfoclasse=this.att_hinfoclasse;
x_4.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_typage8_36() throws Exception {
try {
// instructions
this.att_type= new DTYPE("void", 0);
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_action_35(S_ER_MJAVA x_3, S_AFFX_MJAVA x_4) throws Exception {
try {
// instructions
this.att_isVariable=false;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MJAVA.token_affect : // 19922
        regle35 () ;
      break ;
      case LEX_MJAVA.token_pv : // 19920
        regle36 () ;
      break ;
      case LEX_MJAVA.token_virg : // 19919
        regle36 () ;
      break ;
      case LEX_MJAVA.token_parf : // 19914
        regle36 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMJAVAMessages.id_MJAVA_unexpected_token,MJAVAMessages.MJAVA_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
